Skip to content

[Revive] Change default value of eth_getStorageAt#10471

Merged
TorstenStueber merged 4 commits intomasterfrom
230-eth_getstorageat-should-always-return-32-bytes
Dec 1, 2025
Merged

[Revive] Change default value of eth_getStorageAt#10471
TorstenStueber merged 4 commits intomasterfrom
230-eth_getstorageat-should-always-return-32-bytes

Conversation

@TorstenStueber
Copy link
Copy Markdown
Contributor

@TorstenStueber TorstenStueber commented Nov 28, 2025

Closes paritytech/contract-issues#230

With this change eth_getStorageAt of the eth rpc always returns a 32 byte array. If the storage slot has never been written before, it returns the 32 byte zero value as the default value. Before that it was the empty array.

Fixes

This PR fixes the following three tests in the OZ test suite:

  • Address
    • functionDelegateCall
      • delegate calls the requested function
  • LowLevelCall
    • delegate
      • without any return
        • calls the requested function and returns true
  • LowLevelCall
    • delegate
      • with 64 bytes return in the scratch space
        • calls the requested function and returns true

@TorstenStueber TorstenStueber changed the title Change default value of eth_getStorageAt [Revive] Change default value of eth_getStorageAt Nov 29, 2025
@TorstenStueber
Copy link
Copy Markdown
Contributor Author

/cmd prdoc --audience runtime_dev --bump patch

@pgherveou pgherveou requested a review from xermicus December 1, 2025 12:57
@TorstenStueber TorstenStueber added this pull request to the merge queue Dec 1, 2025
Merged via the queue into master with commit 55a545d Dec 1, 2025
268 of 276 checks passed
@TorstenStueber TorstenStueber deleted the 230-eth_getstorageat-should-always-return-32-bytes branch December 1, 2025 20:27
bee344 pushed a commit that referenced this pull request Dec 2, 2025
Closes paritytech/contract-issues#230

With this change `eth_getStorageAt` of the eth rpc always returns a 32
byte array. If the storage slot has never been written before, it
returns the 32 byte zero value as the default value. Before that it was
the empty array.

## Fixes
This PR fixes the following three tests in the OZ test suite:
- `Address`
  - `functionDelegateCall`
    - `delegate calls the requested function`
- `LowLevelCall`
  - `delegate`
    - `without any return`
      - `calls the requested function and returns true`
- `LowLevelCall`
  - `delegate`
    - `with 64 bytes return in the scratch space`
      - `calls the requested function and returns true`

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@TorstenStueber TorstenStueber added the T7-smart_contracts This PR/Issue is related to smart contracts. label Dec 4, 2025
TorstenStueber added a commit that referenced this pull request Dec 6, 2025
Backport all pallet-revive related changes into `unstable2507`.

These are all the changes we want to get onto the next Kusama release.
Main changes include
- EVM backend
- Ethereum block storage
- Generalized gas mapping

The complete list of PRs in this backport is
- #9482
- #9455
- #9454
- #9501
- #9177
- #9285
- #9606
- #9414
- #9557
- #9617
- #9385
- #9679
- #9705
- #9561
- #9744
- #9736
- #9701
- #9517
- #9771
- #9683
- #9791
- #9717
- #9759
- #9823
- #9768
- #9853
- #9801
- #9780
- #9796
- #9878
- #9841
- #9670
- #9865
- #9803
- #9928
- #9818
- #9911
- #9942
- #9831
- #9945
- #9603
- #9968
- #9939
- #9991
- #9914
- #9997
- #9985
- #10016
- #10027
- #10026
- #9418
- #9988
- #10041
- #10047
- #10032
- #10065
- #10089
- #10080
- #10090
- #10106
- #10020
- #9512
- #10109
- #9699
- #10100
- #9909
- #10120
- #10146
- #10157
- #10168
- #10169
- #10160
- #10129
- #10175
- #10186
- #10192
- #10148
- #10193
- #10220
- #10233
- #10191
- #10225
- #10246
- #10239
- #10159
- #10252
- #10224
- #10267
- #10271
- #10214
- #10297
- #10290
- #10281
- #10272
- #10303
- #10336
- #10244
- #10366
- #10380
- #10383
- #10387
- #10302
- #10309
- #10427
- #10385
- #10451
- #10471
- #10166
- #10510
- #10393
- #10540
- #9587
- #10071
- #10558
- #10554
- #10325

---------

Signed-off-by: xermicus <cyrill@parity.io>
Co-authored-by: Pavlo Khrystenko <45178695+pkhry@users.noreply.github.com>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Javier Viola <363911+pepoviola@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <info@kchr.de>
Co-authored-by: pgherveou <pgherveou@gmail.com>
Co-authored-by: Omar <OmarAbdulla7@hotmail.com>
Co-authored-by: 0xRVE <robertvaneerdewijk@gmail.com>
Co-authored-by: xermicus <cyrill@parity.io>
Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T7-smart_contracts This PR/Issue is related to smart contracts.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

eth_getStorageAt should always return 32 bytes

3 participants